import Vue from 'vue'
import Router from 'vue-router'
import Main from '../components/Main.vue'
import Home from '../components/Home.vue'
import article from '../components/Article.vue'
import Heroes from '../components/heroes.vue'
import waycenter from '../components/waycenter.vue'
import match from '../components/match.vue'
import IPgame from '../components/IPgame.vue'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component:Main,
      children:[
        {
        path: '/home',
        name: 'Home',
        component:Home,
      },
        {
          path:'/articles/:id',
          name:'articles',
          component:article,
          props:true
      }
  ]
    },
    {
      path:'/heroes/:id',
      name:'heroes',
      component:Heroes,
      props:true
    },
    {
      path:'/waycenter',
      name:'waycenter',
      component:waycenter,
    },
    {
      path:'/match',
      name:'match',
      component:match,
    },
    {
      path:'/IPgame',
      name:'IPgame',
      component:IPgame,
    },
    
  ]
})
